/**
 * 格式化时间戳
 */
export const getDateTime = (ts) => {
  const date = new Date(ts)
  const y = date.getFullYear()
  const m = (date.getMonth() + 1).toString().padStart(2, '0')
  const d = date.getDate().toString().padStart(2, '0')
  const H = date.getHours().toString().padStart(2, '0')
  const M = date.getMinutes().toString().padStart(2, '0')
  const S = date.getSeconds().toString().padStart(2, '0')
  return `${y}-${m}-${d} ${H}:${M}:${S}`
}